﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class changeMobile : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["NEW"] != null)
        {
            LB3.Text = Session["NEW"].ToString();
        }
        else
        {
            Response.Redirect("MainPage.aspx");
        }

    }
    protected void change3_Click(object sender, EventArgs e)
    {
        using (RegisterationDBEntities DB = new RegisterationDBEntities())
        {
            Student_Information select = (from SI in DB.Student_Information where SI.StudentName == LB3.Text select SI).FirstOrDefault();
            select.Mobile_Number =int.Parse( CHmobileTextBox.Text);
            DB.SaveChanges();
            Response.Redirect("~/Updatetd.aspx");



        }
    }

    protected void Buttonsignout_Click(object sender, EventArgs e)
    {
        Response.Redirect("MainPage.aspx");
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
       
    }
}